import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path'

// https://vite.dev/config/
export default defineConfig({
  base: './',
  plugins: [vue()],
  resolve: {
    alias: {
      '@': path.resolve(__dirname, './src')
    }
  },
  server: {
    proxy: {
      '/apiedu': {
        target: 'http://192.168.15.200:38080',
        // target: 'http://192.168.0.166:38080',
        // target: 'http://192.168.0.190:28080/vertc',
        changeOrigin: true, 
        rewrite: (path) => path.replace(/^\/apiedu/, ''), 
        secure: false,
      }
      // ,
      // '/vtoken': {
      //   target: 'http://192.168.0.54:28082',
      //   changeOrigin: true, 
      //   rewrite: (path) => path.replace(/^\/vtoken/, ''), 
      //   secure: false,
      // },
    },
  },
})
